<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>桌面小说阅读器</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
            background: transparent;
            color: #cccccc;
            overflow: hidden;
            user-select: none;
            -webkit-app-region: drag;
            transition: all 0.2s ease;
        }

        body.hover {
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(5px);
        }

        .novel-container {
            width: 100%;
            height: 100vh;
            padding: 20px;
            position: relative;
        }

        .title-bar {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 40px;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            z-index: 1000;
            -webkit-app-region: drag;
            opacity: 0;
            transform: translateY(-100%);
            transition: all 0.3s ease;
            pointer-events: none;
            border-bottom: 2px solid rgba(255, 255, 255, 0.2);
        }

        .title-bar.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .title {
            font-size: 12px;
            color: #ffffff;
        }

        .controls {
            display: flex;
            gap: 10px;
            -webkit-app-region: no-drag;
        }

        .control-btn {
            background: none;
            border: none;
            color: #ffffff;
            cursor: pointer;
            font-size: 13px;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.2s ease;
            font-weight: 500;
        }

        .control-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .content-area {
            margin-top: 0;
            height: 100vh;
            overflow: hidden;
            position: relative;
        }

        .novel-content {
            font-size: 14px;
            line-height: 1.8;
            text-align: justify;
            padding: 15px;
            white-space: pre-wrap;
            word-wrap: break-word;
            animation: scrollText 60s linear infinite;
            color: #cccccc;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            letter-spacing: 0.5px;
        }

        @keyframes scrollText {
            0% {
                transform: translateY(100%);
            }
            100% {
                transform: translateY(-100%);
            }
        }

        .settings-panel {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0, 0, 0, 0.9);
            border-radius: 5px;
            padding: 10px;
            display: none;
            z-index: 1001;
            -webkit-app-region: no-drag;
        }

        .settings-panel.show {
            display: block;
        }

        .setting-item {
            margin-bottom: 10px;
        }

        .setting-item label {
            display: block;
            font-size: 12px;
            margin-bottom: 5px;
        }

        .setting-item input {
            width: 100%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #ffffff;
            padding: 5px;
            border-radius: 3px;
        }

        .pause-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 999;
        }

        .pause-overlay.show {
            display: flex;
        }

        .pause-text {
            font-size: 24px;
            color: #ffffff;
        }
    </style>
</head>
<body>
    <div class="novel-container">
        <div class="title-bar">
            <div class="title">桌面小说阅读器</div>
            <div class="controls">
                <button class="control-btn" id="settingsBtn">设置</button>
                <button class="control-btn" id="pauseBtn">暂停</button>
                <button class="control-btn" id="closeBtn">关闭</button>
            </div>
        </div>

        <div class="content-area">
            <div class="novel-content" id="novelContent">
                正在加载小说内容...
            </div>
        </div>

        <div class="settings-panel" id="settingsPanel">
            <div class="setting-item">
                <label>字体大小 (px)</label>
                <input type="range" id="fontSizeSlider" min="10" max="24" value="14">
                <span id="fontSizeValue">14px</span>
            </div>
            <div class="setting-item">
                <label>滚动速度 (秒)</label>
                <input type="range" id="speedSlider" min="30" max="120" value="60">
                <span id="speedValue">60秒</span>
            </div>
            <div class="setting-item">
                <label>悬停延迟 (毫秒)</label>
                <input type="range" id="hoverDelaySlider" min="100" max="800" value="200" step="50">
                <span id="hoverDelayValue">200ms</span>
            </div>
        </div>

        <div class="pause-overlay" id="pauseOverlay">
            <div class="pause-text">已暂停</div>
        </div>
    </div>

    <script src="./floating.js"></script>
</body>
</html>